[#63717] Filterable tree view - #321
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 70ed74d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
HDinger
force-pushed
the
filterable_tree_view
branch
from
August 12, 2025 07:59
2efce77 to
a084f24
Compare
…ighting works in Safari as well
HDinger
force-pushed
the
filterable_tree_view
branch
from
August 12, 2025 08:11
a084f24 to
1c7bb7e
Compare
Collaborator
|
The performance will need some improvements before we can use that for long lists. A quick test with ~7500 items needed approx 9s. However, the reason is more in the TreeView itself which needs 7s for 7500 items. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
This PR introduces the
FilterableTreeViewcomponent, which is aTreeViewand associated filter controls that allow searching a hierarchy for desired items.FilterableTreeViewcan be used both inside and outside the context of a Rails form, making user selections easy to submit to the backend.This PR also includes several updates to the
TreeViewcomponent, namely:descendantsselect mode has been renamedmixed_descendants. The select mode now nameddescendantsbehaves slightly differently from its predecessor in that nodes are always either checked ("true") or unchecked ("false") and are never in an indeterminate/mixed state. The goal here was to allow treating sub-tree nodes as selectable entities in their own right rather than simply part of the hierarchy.Remaining tasks:
Screenshots
Alt: The
FilterableTreeViewcomponent in action. The user shows a hierarchy of Hogwarts houses from the Harry Potter series and the students that lived in them. Features like the "Include sub-items" check box is enabled, demonstrating its effects. Filter text is entered to demonstrate hiding non-matching nodes and text highlighting, and the filter mode control shows that only checked nodes are shown when the "Selected" option is chosen.Screen.Recording.2025-06-10.at.11.16.02.PM.mov
Integration
No changes necessary in production - everything in this PR should be 100% backwards-compatible.
List the issues that this change affects.
Closes #63717
Risk Assessment
Accessibility
Merge checklist